package com.vdong.trade.trading.facade.enums;

/**
 * 是否有效  0 ：无效 1：有效
 */
public enum StatusEnum {

    STATUS_OK("无效", new Byte("0")),
    STATUS_NO("有效", new Byte("1"));

    private String state;
    private Byte value;

    private StatusEnum(String state, Byte value) {
        this.state = state;
        this.value = value;
    }

    public static StatusEnum getEnum(int value) {
        for (StatusEnum requisitionConstant : StatusEnum.values()) {
            if (requisitionConstant.getValue() == value) {
                return requisitionConstant;
            }
        }
        return null;
    }

    public Byte getValue() {
        return value;
    }

    public String getState() {
        return state;
    }
}
